<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* 
          运算符优先级:
                1.()
                2.单目运算 ++--
                3.算数运算符  + - * / % (先乘除后加减)
                4.比较运算符 > < >= <= != == ===
                5.逻辑运算符 && || (先&& 后||)
                6.三目运算 ? : (了解)
                7.赋值运算  = += -= *= /=


        技巧 : 一般通过逻辑运算符切割.
        */

        console.log(4 >= 6 || '人' != '黑色毛衣' && !(12 * 2 == 144) && true);  //true

        var num = 10;
        console.log(5 == num / 2 && (2 + 2 * num).toString() === '22');  //true

        console.log('----------------------------------------');
        var a = 3 > 5 && 2 < 7 && 3 == 4;

        console.log(a);//false

        var b = 3 <= 4 || 3 > 1 || 3 != 2;
        console.log(b);  // true

        var c = 2 === "2";
        console.log(c);  // false

        var d = !c || b && a;  //true
        var d = true || true && false;  //ture
        console.log(d);
    </script>
</body>
</html>